{% extends 'learing_logs/base.html' %}
{% block header %}
    <h5>博客列表</h5>
{% endblock header%}

{% block content %}
    <ul class="list-group">
        {% for blog in blogs %}            
            <li class = "list-group-item" >
                <a href="{% url 'learing_logs:blog' blog.id %}">{{ blog.title_short }}</a>
                <a href="{% url 'learing_logs:del_blog' blog.id %}" class="label label-default" >删除</a>
                <a href="{% url 'learing_logs:edit_blog' blog.id  %}" class="label label-primary" >编辑</a>
            </li>                
        {% empty %}
            <li class = "list-group-item" >你还没有发表过博客<a href="">去写一篇</a></li>
        {% endfor %}
    </ul>
    <h6><a href="{% url 'learing_logs:new_blog' %}" class="btn btn-primary">写一篇</a></h6>
{% endblock content %}